package com.company.cloud.crm.modules.mgr.controller;

import com.company.cloud.common.auth.annotation.Authc;
import com.company.cloud.common.bean.BaseResult;
import com.company.cloud.common.bean.LoginSimpleUserInfo;
import com.company.cloud.common.utils.AuthContextUtils;
import com.company.cloud.crm.modules.cache.models.CustomerContactModel;
import com.company.cloud.crm.modules.mgr.controller.req.ContactQuery4PageParam;
import com.company.cloud.crm.modules.mgr.service.CustomerContactMgrService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Authc
@RestController
@RequestMapping("/mgr/crm/custContact")
@Api(tags = "CRM_Mgr_客户联络人管理")
public class CustomerContactMgrController {

    @Autowired
    private CustomerContactMgrService customerContactMgrService;

    @PostMapping("/query")
    @ApiOperation(value = "查询联络人信息", response = CustomerContactModel.class)
    public BaseResult query(@RequestBody ContactQuery4PageParam params) {
        LoginSimpleUserInfo userInfo = AuthContextUtils.getUser();
        return BaseResult.ok();
    }

    @GetMapping("/queryContactMyCust")
    @ApiOperation(value = "查询客户查询联络人信息", response = CustomerContactModel.class)
    public BaseResult queryContactMyCust(@RequestParam("custNo") String custNo) {
        LoginSimpleUserInfo userInfo = AuthContextUtils.getUser();
        return BaseResult.ok();
    }

}
